using System;

using Dashboard;

namespace Dashboard.Mint.Actions {
	
	[Action (Type = "db:location")]
	public class MapViewAction : Action {

		public MapViewAction ()
		{
			Name = "View Map";
			Description = "Show location using Google Maps";
		}

		public override void Execute (Match match)
		{
			string city = match.Properties ["db:city"].Value;
			string country = match.Properties ["db:country"].Value;
			string location = String.Format ("{0}, {1}", city, country);

			Gnome.Url.Show ("http://maps.google.com/?q=" + location);
		}
	}
}